Storage medium, information processing apparatus and calculation method

ABSTRACT

An information processing apparatus obtains an incident radiance at a shading point by obtaining a light emission radiance of a target light source expressed by a spherical Gaussian (SG expressed), approximating by a spherical Gaussian (SG approximating) a function indicating a spread of the target light source from a perspective of the shading point, and obtaining the product of these. Also, the apparatus SG approximates a bidirectional reflection distribution function (BRDF) at a shading point, and calculates the radiance at the shading point based on information indicating the viewpoint for which the shading point is to be rendered, an incident radiance at the shading point, and the SG approximated BRDF at the shading point.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a storage medium, an information processing apparatus, and a calculation method, and particularly to a rendering expression technique for radiance that occurs in an object surface due to a light source.

2. Description of the Related Art

In recent years, in the field of computer graphics, various rendering expression techniques have been proposed and implemented in order to provide high quality and realistic graphics. One such rendering expression technique renders/reproduces a radiance that occurs due to a light source considering a material of an object (a rendering object) that is to be rendered, a light source type of an illumination which is arranged in the periphery of the object, or the like.

A radiance at a single point (a shading point) on a rendering object or a radiance on a single pixel on an image that is to be rendered is reproduced by summing the radiances that occur due to illumination (direct light) arranged in the periphery, and due to so-called indirect light which occurs by those light sources reflecting from particular surfaces. More specifically, a solution (the radiance due to each light source) to a rendering equation for each light source is obtained, and by integrating these, the radiance at a shading point due to the peripheral light sources is calculated. As one approach to obtaining this integration solution, for the indirect light, there exists an instant radiosity approach for approximating the indirect light from a plurality of virtual point lights. Also, regarding the direct light, there is an approach for obtaining an approximation solution for the integration by approximating a light source that has an area by a plurality of point light sources.

Meanwhile, in a scheme for simply approximating point light sources as described above, when the light source position and the shading point are extremely close, the shading point is of a material that shows a sharp reflection distribution as with a specular reflection, or the like, there are cases in which unnatural rendering results (a spike-form artifact) such as the shading point suddenly becoming bright are shown. This is due to a dispersion of an error becoming large when an item indicating the distance to the shading point exists in the denominator in the rendering equation, and a bidirectional reflection distribution function (BRDF) existing in the numerator is sharp.

In response to this, in Jiaping Wang et al., “All-Frequency Rendering of Dynamic, Spatially-Varying Reflectance”, ACM Transactions on Graphics, Vol. 28 Number. 5, pp. 133:1-133:10, December, 2009, by approximating to a spherical Gaussian (SG approximating) a light source, occurrences of unnatural specular reflections in a scene that defines Spherical Light having a small radius as the direct light are eliminated.

However, because the approximation solution approach of the rendering equation that Wang et al. proposed ignores physics, tuning of parameters depending on the scene is necessary for each light source, and there are cases in which this is not realistic when there exist many light sources, or the user work corresponding to the tuning is cumbersome. Also, because Wang assumes only Spherical Light with a small radius, there is the possibility that energy will not conserved and the approximation error will be large due to the radius becoming large in this solution. Furthermore, because the distance between the light source and the shading point exists in the denominator in the rendering equation after the approximation, there are cases in which a spike-form artifact still appears in the rendering result.

Meanwhile, in an approach proposed in Kun Xu et al., “A Practical Algorithm for Rendering Interreflections with All-frequency BRDFs”, ACM Transactions on Graphics, Vol. 33 Number. 1, pp. 10:1-10-16, January, 2014, an SG approximation is performing for a cone formed by a shading point and a light source (a virtual spherical light source) considering the conservation law of energy, but when the distance between the light source and the shading point is short, avoiding the occurrence of a spike-form artifact is impossible, and so different approaches are used in accordance with the distance.

SUMMARY OF THE INVENTION

The present invention was made in view of such problems in the conventional technique. The present invention provides a storage medium, an information processing apparatus, and a calculation method for realizing a suitable rendering expression for radiance that reduces the occurrence of spike-form artifacts.

The present invention in its first aspect provides a non-transitory computer-readable storage medium storing a program that causes one or more computers for calculating a radiance at a shading point in a 3D scene to execute: processing for obtaining a light emission radiance of a target light source expressed by a spherical Gaussian (SG expressed); processing for approximating by a spherical Gaussian (SG approximating) a function that indicates a spread of the target light source from a perspective of the shading point; processing for obtaining an incident radiance at the shading point by obtaining a product of the SG expressed light emission radiance of the target light source and the SG approximated function that indicates the spread of the target light source; processing for SG approximating a bidirectional reflection distribution function (BRDF) at the shading point; and processing for calculating the radiance at the shading point based on information indicating a viewpoint at which the shading point is to be rendered, the incident radiance at the shading point and the SG approximated BRDF at the shading point.

The present invention in its second aspect provides an information processing apparatus that calculates a radiance at a shading point in a 3D scene, the apparatus comprising: an obtainer which is able to obtain a light emission radiance of a target light source expressed by a spherical Gaussian (SG expressed); a first approximator which is able to approximate by a spherical Gaussian (SG approximating) a function that indicates a spread of the target light source from a perspective of the shading point; a first calculator which is able to calculate an incident radiance at the shading point by obtaining a product of the SG expressed light emission radiance of the target light source obtained by the obtainer and the function that indicates the spread of the target light source that is SG approximated by the first approximator; a second approximator which is able to SG approximate a bidirectional reflection distribution function (BRDF) at the shading point; and a second calculator which is able to calculate the radiance at the shading point based on information indicating a viewpoint at which the shading point is to be rendered, the incident radiance at the shading point obtained by the first calculator and the BRDF at the shading point that is SG approximated by the second approximator.

The present invention in its third aspect provides a calculation method for a radiance at a shading point in a 3D scene, the method comprising: an obtaining step of obtaining a light emission radiance of a target light source expressed by a spherical Gaussian (SG expressed); a first approximation step of approximating by a spherical Gaussian (SG approximating) a function that indicates a spread of the target light source from a perspective of the shading point; a first calculation step of obtaining an incident radiance at the shading point by obtaining a product of the SG approximated light emission radiance of the target light source obtained by the obtaining step and the function that indicates the spread of the target light source that is SG approximated in the first approximation step; a second approximation step of SG approximating a bidirectional reflection distribution function (BRDF) at the shading point; and a second calculation step of calculating the radiance at the shading point based on information indicating a viewpoint at which the shading point is to be rendered, the incident radiance at the shading point obtained in the first calculation step and the BRDF at the shading point that is SG approximated in the second approximation step.

Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram for illustrating a functional configuration of a PC 100 corresponding to embodiments and variations of the present invention.

FIG. 2 is a flowchart for exemplifying radiance calculation processing is executed on the PC 100 according to a first embodiment of the present invention.

FIG. 3 is a view for explaining a spread of a target light source from the perspective of a shading point according to embodiments of the present invention.

FIG. 4 is a flowchart for exemplifying radiance calculation processing is executed on the PC 100 according to a second embodiment of the present invention.

FIGS. 5A and 5B are views for explaining a flicker phenomenon of an indirect light due to a clustering according to a variation of the present invention.

FIG. 6 is a flowchart for exemplifying radiance calculation processing which is executed on the PC 100 in accordance with a variation of the present invention.

DESCRIPTION OF THE EMBODIMENTS First Embodiment

Exemplary embodiments of the present invention will be described hereinafter in detail, with reference to the accompanying drawings. Note that the embodiments explained below explain an example in which the present invention is applied to a PC which is capable of generating computer graphics (CG) images in which radiance at a shading point is reflecting in a 3D scene, the PC being an example of an information processing apparatus. However, the present invention is applicable to any device capable of calculating a radiance at a shading point in a 3D scene.

Also, it is assumed that “a shading point”, in the specification, indicates a point, in a rendering of a rendering object, which corresponds to the point, at which a luminance component (radiance) that the object emitted toward a viewpoint is obtained. Also, it is assumed that “a light emission radiance” indicates a radiance determined in advance by a scene designer, or the like, which a light source defined in the 3D scene provides for the scene, and “an incident radiance” indicates a radiance that is emitted from the light source and is incident on a shading point. Also, it is assumed that when simply “radiance” is expressed, it is indicating a radiance that a shading point presents towards a viewpoint according to a CG image that is to be rendered.

<Configuration of a PC 100>

FIG. 1 is a block diagram for showing a functional configuration of the PC 100 according to embodiments of the present invention.

A control unit 101 controls operation of each block that the PC 100 comprises, and may be a CPU, for example. More specifically, the control unit 101 reads operation programs for blocks stored in a storage medium 102, loads the operation programs into a memory 103, and executes the operation programs, thereby controlling the operation of each block.

The storage medium 102 is a storage apparatus such as a non-volatile memory, an HDD, or the like. The storage medium 102 stores parameters necessary in the operation of each block in addition to the operation programs of the blocks that the PC 100 comprises. Also, the storage medium 102 stores various data of rendering objects arranged in a 3D scene (target scene) which is a target of generation in the rendering processing which is described later. Also, the memory 103 is a volatile memory such as a RAM. The memory 103 stores intermediate data output in the operation of the blocks in addition to being a loading region for the operation programs of the blocks.

A rendering unit 104 is, for example, a rendering apparatus such as a GPU, or the like. The rendering unit 104 performs processing such as a translation, a rotation, or the like, based on predetermined parameters, and executes rendering processing by which a target scene is rendered in accordance with information of a viewpoint that is set (a position, a direction, an angle of view, an upward direction, or the like) on data of a rendering object that is loaded into a rendering memory 105, for example, and thereby generates a CG image. The PC 100 of the present embodiment executes later described radiance calculation processing for calculating a radiance that occurs due to a light source corresponding to a direct light arranged in a target scene for at least a part of a rendering object in rendering processing.

<Radiance Calculation Processing>

Specific processing for the radiance calculation processing executed in the PC 100 of the present embodiment having this kind of configuration will be explained using the flowchart of FIG. 2. The processing corresponding to this flowchart can be realized by the control unit 101 reading a corresponding processing program stored in the storage medium 102, for example, loading the processing program into the memory 103, and executing the processing program. Note that the radiance calculation processing is explained as something that is executed for each shading point for which the radiance calculation is performed at a predetermined timing of the rendering processing, for example. Also, in the present embodiment, for convenience, explanation is given having the agent of the calculation in the radiance calculation processing be the control unit 101, but the implementation of the present invention is not limited to this. In other words, because radiance that occurs due to a plurality of light sources is calculated for each of a plurality of shading points, it should be easily understood that the rendering unit 104, which excels at concurrent calculation, may execute at least a part of the radiance calculation processing.

In step S201, the control unit 101 approximates to an anisotropic spherical Gaussian (ASG approximation) a bidirectional reflection distribution function (BRDF) at a shading point. The anisotropic spherical Gaussian is an approximation method that is proposed by Xu et al. for reducing a computation cost when performing an illumination calculation for a light source comprising a spread by using a Monte Carlo method (Kun Xu et al., “Anisotropic Spherical Gaussians”, ACM Transactions on Graphics, Vol. 32 Number. 6, pp. 209:1-209:11, November, 2013). The BRDF may be approximated by a spherical Gaussian, but because a lobe of a reflection is an anisotropic distribution even with an isotropic BRDF, an ASG approximation is performed for the BRDF of the shading point in the present embodiment. When the ASG approximation is used, the calculation becomes more complex than when an SG approximation is used, but a calculation result which has a higher level of reproduction can be obtained.

Note that in the present embodiment explanation is given for using an anisotropic spherical Gaussian for only a BRDF approximation at a shading point considering an increase in the calculation amount, but the implementation of the present invention is not limited to this. In embodiments of the present invention, while various parameters are approximated to a spherical Gaussian as will be explained later, it may be freely selected whether to make the spherical Gaussian in the approximation to be isotropic or anisotropic based on desired calculation time, calculation amount, and reproduction precision. Also, the ASG approximation and the SG approximation are not limited to the schemes using analytical approximation indicated by Wang and Xu, and other approaches such as fitting may be used.

In step S202, the control unit 101 selects a light source, for which the contribution amount of the light source to the radiance in the shading point is not calculated yet, to be a target light source from out of the light sources corresponding to the direct light defined within the target scene. In the present embodiment, for simplicity, explanation is given having the a directional distribution of a light emission radiance of the light source corresponding to direct light that is the target of the radiance calculation processing be expressed (SG expression) by a spherical Gaussian in advance. In other words, the light emission radiance of the light source corresponding to a direct light defined in the target scene

L _(em)(−ω)=μ_(em) G(ω,ξ_(em),η_(em))∵G(ω,ξ_(em),η_(em))=exp(η_(em)((ω·ξ_(em))−1))

may be defined by various parameters of the spherical Gaussian defined by the scene designer that designed the target scene (the amplitude μ_(em) (spread) of the spherical Gaussian, a center vector ξ_(em) of light emission, a sharpness η_(em)), and a vector ω for all light beams emitted from the target light source, for example. Note that a target light source that has been SG expressed need not show a distribution having a directional bias, and may include a uniform distribution. For example, in a case where the target light source is of a uniform distribution in regards to directionality, the light emission radiance can be SG expressed as sharpness η_(em)=0.

Note that in the invention according to the present embodiment, the light source corresponding to the direct light that is the target of the application need not be something for which light emission radiance is SG expressed in advance. In the invention according to the present embodiment, the light source corresponding to the direct light that is the target of the application may be a light source that has a spread as with Spherical Light, and may be a light source that can be approximated with a spherical Gaussian (SG approximation) such as a light source that has directionality, such as a spotlight. In such a case, the light emission radiance may be SG approximated by performing processing such as fitting a distribution of a light bundle emitted from a target light source by a least-square method, or the like.

In step S203, the control unit 101 SG approximates a function L_(c)(x,ω) (x is a vector that indicates a shading point) that indicates the spread of the target light source from the perspective of the shading point. As described above, in the invention according to the present embodiment because the light source that is the target of the application has a spread, the spread which has the shading point as a basis can be indicated by a function. For example, when the target light source is Spherical Light, the spread of the target light source from the perspective of the shading point is a function that indicates a shape of a cone defined by the shading point and Spherical Light. If it is assumed that the function indicating the spread of the target light source, by the SG approximation, can be represented by

L _(c)(x,ω)≈μ_(c) G(ω,ξ_(c),η_(c))  (1)

then because it is necessary to conserve the energy in the cone

${\int\limits_{S^{2}}{{L_{c}\left( \omega^{\prime} \right)}{\omega^{\prime}}}} = {\int\limits_{S^{2}}{\mu_{c}{G\left( {\omega^{\prime},\xi_{c},\eta_{c}} \right)}{\omega^{\prime}}}}$

is established, and accordingly an amplitude μ_(c) of the spherical Gaussian can be obtained with

$\mu_{c} = \frac{\int\limits_{S^{2}}{{L_{c}\left( \omega^{\prime} \right)}{\omega^{\prime}}}}{\int\limits_{S^{2}}{{G\left( {\omega^{\prime},\xi_{c},\eta_{c}} \right)}{\omega^{\prime}}}}$

Note that ξ_(c) is a vector that defines a rotation shaft of the cone, is shown in FIG. 3, i.e. an inverse vector of the vector directed from the center of Spherical Light toward the shading point, and when the inclination (spread: an angle formed between the rotation shaft and the generatrix of the cone) of the cone from the perspective of the shading point is θ_(r),

${\int\limits_{S^{2}}{{L_{c}\left( \omega^{\prime} \right)}{\omega^{\prime}}}} = {2{\pi \left( {1 - {\cos \; \theta_{r}}} \right)}}$

is established, and thus Equation 1 becomes

${{L_{c}\left( {x,\omega} \right)} \approx {\mu_{c}{G\left( {\omega,\xi_{c},\eta_{c}} \right)}}} = {\frac{\eta_{c}\left( {1 - {\cos \; \theta_{r}}} \right)}{1 - {\exp \left( {{- 2}\; \eta_{c}} \right)}}{G\left( {\omega,\xi_{c},\eta_{c}} \right)}}$

L_(c)(x,ω) which is obtained in this way is a function that indicates 1 if the light beam of the selected vector ω is included in the cone, and indicates 0 if it is not included.

Note that because parameters for which setting is necessary in accordance with a scene indicated by the above described by Wang et al. are excluded, if a sharpness η_(c) of the function that indicates the cone expresses the sharpness by a first order function, then

η_(c) =g(cos θ_(r))

and thus using the least-square method

$\eta_{c} = {\min\limits_{\eta^{\prime}}{\int\limits_{S^{2}}{\left( {{L_{c}\left( \omega^{\prime} \right)} - {\frac{\eta^{\prime}\left( {1 - {\cos \; \theta_{r}}} \right)}{1 - {\exp \left( {{- 2}\; \eta^{\prime}} \right)}}{G\left( {\omega^{\prime},\xi_{c},\eta^{\prime}} \right)}}} \right)^{2}{\omega^{\prime}}}}}$

may be calculated in advance as an optimal solution. In addition, determination may be made using a one-dimensional LUT, or by using the following rational approximation expression obtained experimentally

$\eta_{c} = {{g\left( {\cos \; \theta_{r}} \right)} \approx \frac{1.23090213405182\mspace{14mu} + \mspace{14mu} {0.191696026189420\mspace{14mu} \cos \; \theta_{r}}}{1 - {\cos \; \theta_{r}}}}$

In step S204, the control unit 101 obtains the incident radiance L_(in)(x,ω) at the shading point. The incident radiance L_(in)(x,ω) at the shading point is calculated by a product of the SG expressed light emission radiance and the function L_(c)(x,ω) which indicates the spread of the target light source from the perspective of the SG approximated shading point. In other words, because these are both expressed using spherical Gaussians, the incident radiance L_(in)(x,ω) can be calculated as follows.

${{\begin{matrix} {{L_{in}\left( {x,\omega} \right)} = {{L_{c}\left( {x,\omega} \right)}{L_{em}\left( {- \omega} \right)}}} \\ {{\approx {\mu_{c}{G\left( {\omega,\xi_{c},\eta_{c}} \right)}\mu_{em}{G\left( {\omega,\xi_{em},\eta_{em}} \right)}}}} \\ {{= {\mu_{in}{G\left( {\omega,\frac{\xi_{m}}{\parallel \xi_{m} \parallel},{\parallel \xi_{m} \parallel}} \right)}}}} \end{matrix}\because\xi_{m}} = {{\eta_{c}\xi_{c}} + {\eta_{em}\xi_{em}}}},{\mu_{in} = {\mu_{c}\mu_{em}\mspace{14mu} {\exp \left( {\parallel \xi_{m} \parallel {{- \eta_{c}} - \eta_{em}}} \right)}}}$

Additionally, because the light emission radiance and the function that indicates the spread of the target light source are both represented by spherical Gaussians in this step, it is also possible to express the obtained incident radiance by a spherical Gaussian.

In step S205, the control unit 101 calculates the contribution amount due to the target light source in the radiance at the shading point towards the viewpoint for which the CG image is to be rendered. The control unit 101 calculates the contribution amount due to the target light source in the radiance at the shading point by the product of the SG approximated incident radiance and the SG approximated BRDF at shading point.

In other words, the processing in this step is equivalent to solving the rendering equation for calculating the radiance at the shading point for the viewpoint for which rendering is performed due to all light beams emitted from the target light source. In other words, by using the SG approximation or the ASG approximation, the rendering equation for the shading point (ω_(eye) is a vector directed towards the viewpoint for which rendering is performed from the shading point, and n is the normal vector at the shading point).

Regarding

$\begin{matrix} {{L\left( {x,\omega_{eye}} \right)} = {\int\limits_{S^{2}}{{L_{in}\left( {x,\omega} \right)}{f\left( {x,\omega_{eye},\omega} \right)}\left( {n \cdot \omega} \right){\omega}}}} & (2) \end{matrix}$

in a case where the ASG approximation of the BRDF at the shading point is

f(x,ω _(eye),ω)≈G _(a)(ω,[ξ_(x),ξ_(y),ξ_(z)],η_(x),η_(y))

Equation 2, by using Xu et al.'s ASG approximation method, is

${{\begin{matrix} {{L\left( {x,\omega_{eye}} \right)} = {\int\limits_{S^{2}}{{L_{in}\left( {x,\omega} \right)}{f\left( {x,\omega_{eye},\omega} \right)}\left( {n \cdot \omega} \right){\omega}}}} \\ {{\approx {\int\limits_{S^{2}}{\mu_{in}{G\left( {\omega,\frac{\xi_{m}}{\parallel \xi_{m} \parallel},{\parallel \xi_{m} \parallel}} \right)}\mu_{a}{G_{a}\left( {\omega,\left\lbrack {\xi_{x},\xi_{y},\xi_{z}} \right\rbrack,\eta_{x},\eta_{y}} \right)}{\omega}}}}} \\ {{\approx {\frac{2{\pi\mu}_{in}\mu_{a}}{\sqrt{\left( {{{2\eta_{x}} +} \parallel \xi_{m} \parallel} \right)\left( {{{2\eta_{y}} +} \parallel \xi_{m} \parallel} \right)}}{G_{a}\left( {{\frac{\xi_{m}}{\parallel \xi_{m} \parallel}.\left\lbrack {\xi_{x},\xi_{y},\xi_{z}} \right\rbrack},\frac{\eta_{x} \parallel \xi_{m} \parallel}{{{2\eta_{x}} +} \parallel \xi_{m} \parallel},\frac{\eta_{y} \parallel \xi_{m} \parallel}{{{2\eta_{y}} +} \parallel \xi_{m} \parallel}} \right)}}}} \end{matrix}\because\mu_{a}} = {n \cdot \omega}},{\eta = {2{v\left( {v\mspace{14mu} {is}\mspace{14mu} {disclosed}\mspace{14mu} {in}\mspace{14mu} {Xu}} \right)}}}$

, and the solution can be obtained analytically. Note that in the ASG approximation method by Xu et al. described above, the sharpness of the ASG approximated BRDF is defined as ν, but in the approach of the present embodiment the sharpness of the ASG approximated BRDF is indicated by η, and thus the relation equation is as described above.

In step S206, the control unit 101 integrates the contribution amount of the radiance corresponding to the target light source calculated in step S205 into a radiance value for the shading point which is stored in the memory 103, for example.

In step S207, the control unit 101 determines whether or not an unselected light source exists for the target light source in the light sources corresponding to direct light defined in the target scene. The control unit 101 returns the processing to step S202 when it determines that an unselected light source exists. Also, the control unit 101, in a case where it determines that an unselected light source does not exist, outputs, in step S208, the radiance value for the shading point for which the accumulation of contribution amounts due to the light sources has completed, and it terminates the radiance calculation processing.

In other words, because loop processing in the radiance calculation processing calculates radiance from the shading point towards the viewpoint for which rendering is performed due to one or more light sources corresponding to direct light defined in the target scene, this is equivalent to performing a summation calculation for contribution amounts due to each light source. With this, it is possible to calculate the radiance at a shading point for which the occurrence of spike-form artifacts is reduced excluding parameters for which tuning is necessary for each light source depending on the scene by an artist, or the like, and the distance between the light source and the shading point.

As explained above, by virtue of the information processing apparatus of the present embodiment, it is possible to realize a suitable rendering expression of radiance that reduces spike-form artifacts. The information processing apparatus obtains the incident radiance at the shading point by obtaining the light emission radiance of a target light source expressed by a spherical Gaussian (SG expressed), approximating by a spherical Gaussian (SG approximation) a function indicating the spread of the target light source from the perspective of the shading point, and obtaining the product of these. Also, the apparatus SG approximates a bidirectional reflection distribution function (BRDF) at a shading point, and calculates the radiance at the shading point based on information indicating the viewpoint for which the shading point is to be rendered, an incident radiance at the shading point, and the SG approximated BRDF at the shading point.

Second Embodiment

In the above described first embodiment, explanation was given for obtaining the radiance for a shading point due only to light sources corresponding to direct light existing in the target scene, but the implementation of the present invention is not limited to this. In other words, the present invention is also applicable when considering virtual light sources corresponding to indirect light that occurs due to a light beam being emitted from a light source corresponding to direct light being reflected by a predetermined rendering object existing in the target scene such as is considered in photon tracing or reflective shadow map generation.

Note that unlike with direct light for which various parameters are defined by an artist, or the like, with indirect light the calculation is performed in accordance with physics, such as energy conservation, and thus the approach of Wang et al. cannot be applied for a light source corresponding to indirect light which is considered in the present embodiment. Below, explanation will be given for an approach for reducing the occurrence of spike-form artifacts by excluding the distance between the light source and the shading point by using an SG approximation similarly to in the first embodiment for a light source corresponding to indirect light.

Also, in the present embodiment, because explanation is given for an example in which the present invention is applied to the PC 100, which has the same configuration as in the above described first embodiment, the explanation corresponding to the functional configuration of the PC 100 will be omitted.

<Radiance Calculation Processing>

Below, detailed explanation will be given with reference to FIG. 4 for the radiance calculation processing of the present embodiment. Note that in the radiance calculation processing, for steps that perform similar processing to that of the radiance calculation processing of the above described first embodiment, the same reference numerals are given, and explanation of these is omitted, and the following explanation will be limited to the characteristic steps in the present embodiment. Note that explanation is given having a light source corresponding to indirect light in the following explanation be defined by randomly sampling virtual point light (VPL) defined by 1 bounce in order to simplify the calculation considering real-time rendering, but it goes without saying that configuration may be taken such that the light sources corresponding to indirect light to be considered in embodiments of the present invention be defined by a plurality bounces. Also, a light source corresponding to indirect light in the present embodiment is assumed to be a VPL defined by photon tracing, and this is explained as something that is used having been translated into a virtual spherical light source (VSL) as is proposed by Hasan et al., for example, (Milos Hasan et al., “Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes”, ACM Transactions on Graphics, Vol. 28 Number. 5, pp. 143:1-143:6, December, 2009). However, because embodiments of the present invention omit later explained translation processing the conversion processing, configuration may be taken such that this is defined this in advance as Virtual Area Light (VAL), for example, which has a spread and is proposed by Wallace et al. instead of VSL (John R Wallace et al., “A Ray Tracing Algorithm for Progressive Radiosity”, ACM SIGGRAPH Computer Graphics—Special issue: Proceedings of the 1989 ACM SIGGRAPH conference, Volume 23 Issue 3, pp. 315-324, July, 1989).

In step S201, after ASG approximating the BRDF at the shading point, the control unit 101, in step S401, selects for the target light source 1 light source for which the contribution amount of the light source is not calculated for the radiance at the shading point from out of the light sources defined in the target scene.

In step S402, the control unit 101 determines whether or not the target light source is a light source corresponding to indirect light. In other words, the control unit 101 determines whether or not the target light source is a VPL. The control unit 101 moves the processing to step S403 in cases where it determines that the target light source is a light source that corresponds to indirect light, and moves the processing to step S203 in cases where it determines that the target light source is a light source that corresponds to direct light. Note that because it is assumed that both light sources corresponding to direct light and light sources corresponding to indirect light are included in the target light sources in the present embodiment, and while it is determined which type the target light source is as in this step, it should be easily understood that configuration may be taken such that the later described processing of step S403 and step S404 be performed without performing the processing of this step when it is ascertained in advance that the target light source is a light source corresponding to an indirect light.

In step S403, the control unit 101 translates the target light source into a VSL. In a translation from the VPL to the VSL, the translation to the VSL is performed by defining the center of the VPL as the center position of the VSL, for example, and defining a reciprocal of the density of the VPL as the radius. When it is assumed that the light source corresponding to indirect light is for 1 bounce, the radius r_(em) can be obtained analytically by using the relationship

${\pi \; r_{em}^{2}} \propto \frac{\parallel {x_{0} - x_{em}} \parallel^{2}}{{{Np}\left( \omega_{orig} \right)}\left( {n_{em} \cdot \left( {- \omega_{orig}} \right)} \right)}$

where the light beam sample number is N, the probability density of the light beams is p, a position vector of a direct light source which is the cause of the indirect light is x₀, a position vector of the coordinates (the center coordinates of the VSL) of the VPL is x_(em), a vector directed from the direct light source which is the cause of the indirect light toward the VPL is ω_(orig), and the normal vector at the VPL position is n_(em). In other words, explanation is given having the light source corresponding to direct light be a point light source that does not have a spread since it is not necessary that the direct light source that is the cause of the indirect light be a light source having a spread, as in the first embodiment, because in the radiance calculation processing of the present embodiment, the light source corresponding to indirect light is translated into a light source having a spread. Note that when the photon bounces a plurality of times, and when it is emitted from a large light source having a spread, the above described analytical solution cannot be used, and thus configuration may be taken to use a scheme for obtaining the radius by a density estimation such as that proposed by Hasen et al.

Note that in the present embodiment explanation is given having the analytical solution be used as the radius of the VSL into which the VPL is translated, but the implementation of the present invention is not limited to this. In other words, when each light source corresponding to indirect light, for which a VPL defined by the randomly sampling is translated into a VSL, is handled, and the radius of the VSL is determined to be the analytical solution, an error will become large because the distribution of the VPLs that are actually generated is being ignored even though the probability density is considered, and there is the possibility that an unnatural radiance will be reproduced. In this respect, Prutkin et al. propose an approach for classifying (clustering) into collections by closeness of the VPL position, the level of similarity to the normal at the VPL position, the color of the rendering object at the VPL position, or the like, as the type of the VPL defined by the randomly sampling, and determining the radius of the VSL so as to not duplicate in a collection (Roman Prutkin et al., “Reflective Shadow Map Clustering for Real-Time Global Illumination”, Eurographics 2012 Short Papers, pp. 9-12, March, 2012), and the processing of this step may be performed using this approach.

In step S404, the control unit 101 obtains the light emission radiance L_(in)(−ω) of the translated VSL, and performs the SG approximation. Because the light emission radiance of the VSL changes in accordance with the BRDF of the object at the target light source position, the normal direction, or the like, when the SG approximation of the BRDF is made to be

f(x _(em),ω,ω_(orig))≈μ_(f) G(−ω,ξ_(f),η_(f))

it can be obtained as

${{\begin{matrix} {{L_{em}\left( {- \omega} \right)} = {\frac{\Phi_{em}}{\pi \; r_{em}^{2}}{f\left( {x_{em},{- \omega},{- \omega_{orig}}} \right)}\left( {n_{em} \cdot \left( {- \omega} \right)} \right)}} \\ {{\approx {\frac{\Phi_{em}}{\pi \; r_{em}^{2}}\left( {n_{em} \cdot \left( {- \omega} \right)} \right)\mu_{f}{G\left( {{- \omega},\xi_{f},\eta_{f}} \right)}}}} \\ {{= {\mu_{em}{G\left( {\omega,\xi_{em},\eta_{em}} \right)}}}} \end{matrix}\because\mu_{em}} = {\frac{\Phi_{em}}{\pi \; r_{em}^{2}}\left( {n_{em} \cdot \left( {- \omega} \right)} \right)\mu_{f}}},{\xi_{em} = {- \xi_{f}}},{\eta_{em} = \eta_{f}}$

Note that Φ_(em) is the power (energy) of the photon that is incident on the position of the VPL. After obtaining the SG approximated light emission radiance of the VSL, the control unit 101 moves the processing to step S203. The processing after step S203 can be processed similarly to when the target light source is a light source corresponding to direct light.

With such a configuration, it is possible to calculate the radiance at a shading point while excluding the distance between the light source and the shading point similarly to in the first embodiment by similarly SG approximating the light emission radiance for the light source defined as indirect light in the radiance calculation processing of the present embodiment. In other words, it is possible suitably calculate the radiance at the shading point having considered indirect light that occurred due to a direct light, without being limited to direct light existing in the target scene.

[First Variation]

When reproducing indirect light due to a surface indicating a sharp specular reflection in a specific direction, in a case where the VPLs are sampled discretely, for example, each VPL arranged on the surface is strongly emitted in a direction in accordance with the positional relationship between the VPL and the light source. In other words, because the VPLs are arranged discretely on the surface, and each has a different reflection direction, spot artifacts, such as when a range that is irradiated by light being emitted from one light source and reflected by the surface becoming bright discretely but having gaps, will be caused.

In contrast to this, because it is possible to perform an expression by causing the reflected light to have a spread by performing a VSL translation such as in the second embodiment, and the occurrence of spot artifacts that are due to sharp specular reflections are reduced somewhat. However, because a reflection due to a VSL is emitted strongly in a direction corresponding to a positional relationship between its center and a light source, even if each VSL is dense as shown in FIG. 5A, for example, spot artifacts may occur.

In the variation, explanation will be given for an approach for further reducing this kind of spot artifact. Note that, in the variation, because explanation is given for an example in which the present invention is applied to the PC 100, which has the same configuration as in the above described first embodiment, the explanation corresponding to the functional configuration of the PC 100 will be omitted.

<Radiance Calculation Processing>

Below, detailed explanation will be given with reference to FIG. 6 for the radiance calculation processing of the variation. Note that in the radiance calculation processing, for steps that perform similar processing to that of the radiance calculation processing of the above described first and embodiments, the same reference numerals are given, and explanation of these is omitted, and the following explanation will be limited to the characteristic steps in the present embodiment. Also, in the explanation of the radiance calculation processing, it is assumed that the light source (VPL) corresponding to the indirect light only bounces 1 time for simplicity, and VPLs included in the same collection by clustering have identical normals, color, BRDF, or the like.

In step S201, after the BRDF at the shading point is ASG approximated, the control unit 101, in step S601, performs processing for clustering the light sources (VPLs) corresponding to the indirect light defined in the target scene. The clustering of the variation is explained as something that is performed by the above described selection criteria, but the selection criteria for determining which VPLs are included by the clustering in the same collection are not limited to these in embodiments of the present invention. Also, explanation is given having clustering be used in the present embodiment, but it goes without saying that the present invention is applicable even when the radius r_(em) is obtained analytically as explained in the second embodiment.

In step S602, the control unit 101 translates the VPLs in each collection classified by the clustering into VSLs. At this time, rather than determining the radius of each VSL to be the above described analytical solution, it is assumed that the control unit 101 actually measures which VPL in a cluster is the furthest from the perspective of the center, for example, and the dispersion in the positions of the VPLs, and thereby determines the radius of each VSL such that as much as possible duplications do not occur. The control unit 101, after translating all of the VPLs in the collections into VSLs, moves the processing to step S401.

In step S401, when the target light source is selected, the control unit 101, in step S603, determines whether or not the target light source is a light source corresponding to indirect light. Note that the determination as to whether or not the light source corresponds to indirect light in this step is a determination as to whether or not the target light source is a VSL because all of the VPLs are translated into VSLs in step S602. The control unit 101 moves the processing to step S604 in cases where it determines that the target light source is a light source that corresponds to indirect light, and moves the processing to step S203 in cases where it determines that the target light source is a light source that corresponds to direct light.

In step S604, the control unit 101 obtains the light emission radiance L_(in)(−ω) of the VSL which is the target light source, and performs the SG approximation. At this time, the control unit 101 performs processing (blur processing) for applying a blur effect to the BRDF such that the range irradiated in accordance with the radius of the VSL, i.e. in accordance with the thickness of the cone defined by the shading point and the VSL is extended so that gaps in the range that is irradiated as is shown in FIG. 5A do not occur due to discretization of the virtual light source. In this way, by extending the range irradiated by the blur processing in accordance with the thickness of the cone, it is possible to reproduce the indirect light suitably as shown in FIG. 5B.

Note that in a case where the light emission radiance of the VSL is defined by performing blur processing for the BRDF in this way, the light emission radiance, by SG approximating the blur function, can obtain a solution analytically as

${{{{\int\limits_{S^{2}}{{f\left( {x_{em},{- \omega^{\prime}},{- \omega}} \right)}\left( {n_{em} \cdot \left( {- \omega} \right)} \right){B_{em}\left( \omega^{\prime} \right)}{\omega^{\prime}}}} \approx {\int\limits_{S^{2}}{\mu_{f}{G\left( {\omega^{\prime},\omega,\eta_{f}} \right)}\mu_{b}{G\left( {\omega^{\prime},\xi_{orig},\eta_{b}} \right)}{\omega^{\prime}}}} \approx {\frac{2{\pi\mu}_{f}\mu_{b}}{\eta_{f} + \eta_{b}}{G\left( {\omega,\xi_{orig},\frac{\eta_{f}\eta_{b}}{\eta_{f} + \eta_{b}}} \right)}}}\because\eta_{b}} = {g\left( {\cos \; \theta_{b}} \right)}},{\mu_{b} = \frac{1}{\int\limits_{S^{2}}{{G\left( {\omega^{\prime},\xi_{orig},\eta_{b}} \right)}{\omega^{\prime}}}}}$

Here, B_(em)(ω′) is the blur function, ξ_(orig) is a vector that indicates the axis of the cone formed by the VSL and the light source corresponding to the direct light which is the cause of the indirect light, and μ_(b) and η_(b) respectively indicate the amplitude and the sharpness when SG approximating the cone. Accordingly, the contribution amount of the target light source in the radiance at the shading point obtained in step S205 may be calculated using this.

Note that explanation was given for an approach for reproducing indirect light suitably by performing blur processing in the present embodiment, but spot artifacts in a case where clustering is performed can be solved by an approach for approximating a lobe where a plurality of lobes of the VSLs in the clustering are averaged by applying an averaging principle in Phong Distribution by Toksvig (Michael Toksvig, “Mipmapping Normal Maps”, http://www.nvidia.com/object/mipmapping normal maps.htm 1), is averaging after approximating an SG approximated BRDF to Phong, and once again returning to SG from the phone. Alternatively, averaging of the lobe of the reflection may be performed using an approach by Laurijissen et al. (Jurgen Laurijissen et al., “Fast Estimation and Rendering of Indirect Highlights”, Computer Graphics Forum, Volume 29 Number 4, pp. 1305-1313, June, 2010).

[Second Variation]

The above described first and second embodiments, and in the first variation, explanation was given for approaches for realizing a suitable rendering expression of a radiance that reduces spike-form artifacts while reducing the calculation amount, considering mainly real-time rendering. However, in fields in which there is no constraint on the time by which the calculation should be completed, such as is the case in real-time rendering, where there is no temporal constraint but the rendering reproduction precision is considered important (as with offline rendering), there is the possibility that a desired precision cannot be realized by the above described schemes using SG and ASG approximation on the BRDF. This is due to the fact that even when the SG and ASG approximations using the Spherical Warping approach of Wang et al. cause the number of SGs and ASGs used in the approximation to increase, and the error does not converge. In other words, there is a possibility that on top of the error not converging, the level of reproduction will not improve even if time is taken in offline rendering.

Meanwhile, in a case where there are less stringent constraints on the calculation amount and the calculation time as in offline rendering, it is possible to perform more photon tracing than in real-time rendering, i.e. it is possible to consider calculation of more VSLs. In other words, it is possible to reduce the radius of each VSL defined for a single shading point, and the sharpness η_(c) of the function L_(c)(x,ω) that indicates the shape of the cone that is SG approximated becomes more pronounced. Consequently, in a case where the sharpness η_(c) of the function L_(c)(x,ω) that indicates the shape of the cone that is SG approximated is sufficiently larger than the sharpness η_(ρ) of the SG which is expressed as the product of the SG approximated light emission radiance L_(em)(−ω)) of the VSL and the ASG approximated BRDF of the shading point, it is possible to treat the product of the light emission radiance and the BRDF of the shading point as a constant in the rendering equation.

In other words, if it is established that the sharpness η_(c) of the function L_(c)(x,ω) that indicates the shape of the cone that is SG approximated >>η_(ρ), the rendering equation of Equation 2 is

${{\begin{matrix} {{L\left( {x,\omega_{eye}} \right)} = {\int\limits_{S^{2}}{{L_{in}\left( {x,\omega} \right)}{f\left( {x,\omega_{eye},\omega} \right)}\left( {n \cdot \omega} \right){\omega}}}} \\ {{= {\int\limits_{S^{2}}{{L_{c}\left( {x,\omega} \right)}{L_{em}\left( {- \omega} \right)}{f\left( {x,\omega_{eye},\omega} \right)}\left( {n \cdot \omega} \right){\omega}}}}} \\ {{= {\int\limits_{S^{2}}{{L_{c}\left( {x,\omega} \right)}{\rho (\omega)}{\omega}}}}} \\ {{\approx {\frac{\Phi_{em}{\rho \left( \xi_{c} \right)}}{\pi \; r_{em}^{2}}{\int\limits_{S^{2}}{{L_{c}\left( {x,\omega} \right)}{\omega}}}}}} \\ {{= \frac{{\Phi_{em}{\rho \left( \xi_{c} \right)}} \parallel \Omega \parallel}{\pi \; r_{em}^{2}}}} \end{matrix}\because{\int\limits_{S^{2}}{{\rho (\omega)}{\omega}}}} = {{\int\limits_{S^{2}}{{{L_{em}\left( {- \omega} \right)} \cdot {f\left( {x,\omega_{eye},\omega} \right)}}\left( {n \cdot \omega} \right){\omega}}} \approx \frac{\Phi_{em}{\rho \left( \xi_{c} \right)}}{\pi \; r_{em}^{2}}}},{{L_{c}\left( {x,\omega} \right)} \approx {\mu_{c}{G\left( {\omega,\xi_{c},\eta_{c}} \right)}}},{{\parallel \Omega \parallel} = {{\int\limits_{S^{2}}{{L_{c}\left( {x,\omega} \right)}{\omega}}} = {2{\pi \left( {1 - {\cos \; \theta}} \right)}}}}$

and it is possible to express the BRDF of the shading point and the BRDF of the VSL without ASG or SG approximations. Because this expression does not SG approximate a BRDF, an unreducable error (bias) is removed. Meanwhile, because the BRDF is not SG approximated, there is an increasing error (dispersion), but this may converge when the number of VSLs increases. Also, in a case where the product of the two BRDFs is a sufficiently low frequency compared to L_(c), it can be expected that such an increasing dispersion will be sufficiently small.

Note that, for example, by determining whether or not

η_(ρ)<αη_(c)

is established, i.e. whether or not the sampling number is large and the radius of the VSL is sufficiently small, for each shading point, it can be switched whether the scheme of the second embodiment or the variation is used, or whether a scheme that does not use SG or ASG approximation for the BRDF is used as in this variation. More specifically, if a is a finite value larger than 0 (for example 0.001), when the VPLs are defined to be infinite, the solution converges. Alternatively, distinguishing of the calculation scheme to be used may be performed by arranging a threshold in advance that is unrelated to the sharpness of the function L_(c)(x,ω) which indicates the shape of the cone that is SG approximated for the sharpness of the product of the ASG approximated BRDF of the shading point and the SG approximated BRDF of the VSL, or the sharpness of the product of the ASG approximated BRDF of the shading point and the SG approximated light emission radiance of the VSL.

OTHER EMBODIMENTS

While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions. Also, the information processing apparatus and the calculation method according to the present invention are realizable by a program executing the methods on one or more computers. The program is providable/distributable by being stored on a computer-readable storage medium or through an electronic communication line.

This application claims the benefit of Japanese Patent Application No. 2014-139981, filed Jul. 7, 2014, which is hereby incorporated by reference herein in its entirety. 

1. A non-transitory computer-readable storage medium storing a program that causes one or more computers for calculating a radiance at a shading point in a 3D scene to execute: processing for obtaining a light emission radiance of a target light source expressed by a spherical Gaussian (SG expressed); processing for approximating by a spherical Gaussian (SG approximating) a function that indicates a spread of the target light source from a perspective of the shading point; processing for obtaining an incident radiance at the shading point by obtaining a product of the SG expressed light emission radiance of the target light source and the SG approximated function that indicates the spread of the target light source; processing for SG approximating a bidirectional reflection distribution function (BRDF) at the shading point; and processing for calculating the radiance at the shading point based on information indicating a viewpoint at which the shading point is to be rendered, the incident radiance at the shading point and the SG approximated BRDF at the shading point.
 2. The non-transitory computer-readable storage medium according to claim 1, wherein at least one of the function that indicates the spread of the target light source and the BRDF at the shading point is approximated to an anisotropic spherical Gaussian.
 3. The non-transitory computer-readable storage medium according to claim 1, wherein in the processing for SG approximating the function that indicates the spread of the target light source, a function that indicates a cone shape of the target light source from a perspective of the shading point is SG approximated as the function that indicates the spread of the target light source.
 4. The non-transitory computer-readable storage medium according to claim 1, wherein the target light source includes a first light source corresponding a direct light and a second light source corresponding to an indirect light defined virtually which is caused by the first light source being reflected by a predetermined surface.
 5. The non-transitory computer-readable storage medium according to claim 4, wherein the program further causes the one or more computers to execute processing for defining the second light source as Spherical Light having a predetermined spread.
 6. The non-transitory computer-readable storage medium according to claim 5, wherein in a case where the target light source is the second light source, the program further causes the one or more computers to execute processing for SG approximating an incident radiance of the second light source, and processing for SG approximating a BRDF at a position of the second light source, and in the processing for obtaining the incident radiance at the shading point, the incident radiance at the shading point is obtained by obtaining a product of the SG approximated light emission radiance of the second light source, the SG approximated function that indicates the spread of the target light source, and the SG approximated BRDF at the position of the second light source.
 7. The non-transitory computer-readable storage medium according to claim 6, wherein the program further causes the one or more computers to execute processing for categorizing into collections, in accordance with a predetermined condition, a plurality of the second light source irradiated by the first light source, and in the processing for SG approximating the BRDF at the position of the second light source, for each of the plurality of the second light source in a collection, blur processing is applied to the BRDF at the position of the second light source in accordance with a size of the spread of the respective second light source from the perspective of the shading point.
 8. The non-transitory computer-readable storage medium according to claim 6, wherein the program further causes the one or more computers to execute processing for categorizing into collections, in accordance with a predetermined condition, a plurality of the second light source irradiated by the first light source, and in the processing for SG approximating the BRDF at the position of the second light source, processing for averaging a lobe of a reflection for each of the plurality of second light sources in a collection is applied.
 9. The non-transitory computer-readable storage medium according to claim 6, wherein in a case where a sharpness of the SG approximated function that indicates the spread of the target light source is sufficiently larger than a sharpness of a product of the SG approximated light emission radiance of the second light source and the SG approximated BRDF at the shading point, causes the one or more computers not to execute the processing for SG approximating the BRDF at the shading point and the BRDF at the position of the second light source.
 10. The non-transitory computer-readable storage medium according to claim 1, wherein the target light source includes a plurality of light sources, and the program further causes the one or more computers to execute processing for integrating radiances at the shading point calculated for each of the plurality of light sources.
 11. An information processing apparatus that calculates a radiance at a shading point in a 3D scene, the information processing apparatus comprising: an obtainer which is able to obtain a light emission radiance of a target light source expressed by a spherical Gaussian (SG expressed); a first approximator which is able to approximate by a spherical Gaussian (SG approximating) a function that indicates a spread of the target light source from a perspective of the shading point; a first calculator which is able to calculate an incident radiance at the shading point by obtaining a product of the SG expressed light emission radiance of the target light source obtained by the obtainer and the function that indicates the spread of the target light source that is SG approximated by the first approximator; a second approximator which is able to SG approximate a bidirectional reflection distribution function (BRDF) at the shading point; and a second calculator which is able to calculate the radiance at the shading point based on information indicating a viewpoint at which the shading point is to be rendered, the incident radiance at the shading point obtained by the first calculator and the BRDF at the shading point that is SG approximated by the second approximator.
 12. A calculation method for a radiance at a shading point in a 3D scene, the calculation method comprising: obtaining a light emission radiance of a target light source expressed by a spherical Gaussian (SG expressed); approximating by a spherical Gaussian (SG approximating) a function that indicates a spread of the target light source from a perspective of the shading point; obtaining an incident radiance at the shading point by obtaining a product of the SG approximated light emission radiance of the target light source and the function that indicates the spread of the target light source that is SG approximated; SG approximating a bidirectional reflection distribution function (BRDF) at the shading point; and calculating the radiance at the shading point based on information indicating a viewpoint at which the shading point is to be rendered, the incident radiance at the shading point obtained in the obtaining of the incidence radiance and the BRDF at the shading point that is SG approximated in the SG approximating.
 13. (canceled) 